package com.hitqz.robot.biz.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hitqz.robot.api.business.entity.RobotLockPathEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
  * 机器人管理 Mapper 接口
 * </p>
 *
 * @author xiaojiezhang
 * @since 2021-12-20
 */
@Mapper
public interface RobotLockPathMapper extends BaseMapper<RobotLockPathEntity> {


    /**
     *
     * @param robotSn
     * @return
     */
    List<RobotLockPathEntity> getByRobotSn(@Param(value = "robotSn") String robotSn);

    /**
     *
     * @param lockName
     * @return
     */
    RobotLockPathEntity getByLockName(@Param(value = "lockName") String lockName);


    int deleteByCommonPath(@Param(value = "commonPath") String commonPath);

    int deleteByRobotSn(@Param(value = "robotSn") String robotSn);

    int deleteByRobotSnAndCommpathName(@Param(value = "robotSn")String robotSn, @Param(value = "commonPath")String commonPath);

    int deleteOthers(@Param(value = "robotSn") String robotSn,@Param(value = "commonPath") String commonPath);

    int deleteNotExist(@Param(value = "commonPathNameF")String commonPathNameF, @Param(value = "commonPathNameS")String commonPathNameS,@Param(value = "commonPathNameT") String commonPathNameT);
}